/**
 * 售后订单进度
 */

import React, { Component, PropTypes } from 'react';
import {
  Steps
} from 'antd';
import { List } from 'immutable'
const Step = Steps.Step;

class OrderStep extends Component {
    static propTypes = {
        current:PropTypes.number
    };

    static defaultProps = {
        current:0,
        steps:List.of(),
        status:'process'
    }
    render() {
        const { current, steps, status } = this.props;
        return (
            <div className="order-step">
                <div className="steps">
                    <Steps current={current} status={status}>
                    {steps.map(this.renderStep)}
                    </Steps>
                </div>
            </div>
        );
    }
    /**
     * 售后进度
     */
    renderStep = (step,index) => {
        return (
            <Step
                key={index}
                title={step.title}
                description={<span className="t-grayer">{step.time || ''}</span>}
            />
        )
    }
}


export default OrderStep;